<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/9/14
 * Time: 18:18
 */

namespace app\index\controller;

use think\Loader;
use think\Exception;

class Order
{
    public function syncOrder()
    {
        try {
            Loader::model('Sync', 'logic')->syncOrder();
        } catch (Exception $e) {
            echo $e->getMessage();
//            echo "操作失败";
        }
    }

    public function syncYouZanOrder()
    {
        $yz = new \YouZan();
        $ord = $yz->getOrder();
        try {
            if ($ord) Loader::model('Sync', 'logic')->syncYouZanOrder($ord);
        } catch (Exception $e) {
            echo $e->getMessage();
//            echo "操作失败";
        }
    }
}